#include<SuperOF.h>
using namespace std;
struct XY{
	int x,y;
}; 
int main()
{
	XY xy[1001];
	int place;
	cout<<"how many spots:";
	cin>>place;
	for(int i=1;i<=place;i++)
	{
		cout<<"spot "<<i<<":"<<endl;
		char a='1';
		int x=0,y=0;
		while(a!='O' && a!='o')
		{
			a=getch();
			switch(a)
			{
				case 'a':
				case 'A':
					x-=10;
					break;
					break;
				case 'd':
				case 'D':
					x+=10;
					break;
					break;
				case 'w':
				case 'W':
					y-=10;
					break;
					break;
				case 's':
				case 'S':
					y+=10;
					break;
					break;
			}
			SetCursorPos(x,y);
			cout<<"x:"<<x<<"\ty:"<<y<<endl;
		}
		cout<<"save: x-"<<x<<":y-"<<y<<";"<<endl;
		xy[i].x=x,xy[i].y=y;
		Sleep(1000);
	}
	cout<<"file name:";
	string fn;
	cin>>fn;
	fn+=".ixy";
	cout<<"saving..."<<endl;
	freopen(fn.c_str(),"w",stdout);
	cout<<place<<endl;
	for(int i=1;i<=place;i++)
	{
		cout<<xy[i].x<<" "<<xy[i].y<<endl;
	}
}

